import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.exception.SdkException;

@SdkInternalApi
public class SourceException extends SdkException {
    private SourceException(Builder b) {
        super(b);
    }

    public static Builder builder() {
        return new BuilderImpl();
    }

    interface Builder extends SdkException.Builder {
        @Override
        Builder cause(Throwable cause);

        @Override
        Builder writableStackTrace(Boolean writableStackTrace);

        @Override
        Builder message(String message);

        @Override
        SourceException build();

        @Override
        Builder numAttempts(Integer numAttempts);
    }

    public static class BuilderImpl extends SdkException.BuilderImpl implements Builder {
        @Override
        public Builder cause(Throwable cause) {
            super.cause(cause);
            return this;
        }

        @Override
        public Builder message(String message) {
            super.message(message);
            return this;
        }

        @Override
        public Builder writableStackTrace(Boolean writableStackTrace) {
            super.writableStackTrace(writableStackTrace);
            return this;
        }

        @Override
        public SourceException build() {
            return new SourceException(this);
        }

        @Override
        public Builder numAttempts(Integer numAttempts) {
            super.numAttempts(numAttempts);
            return this;
        }
    }
}
